/*
 * MainEntryPoint.java
 *
 * Created on March 25, 2009, 1:59 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.icatportal.client;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.mvc.Dispatcher;
import com.extjs.gxt.ui.client.util.Theme;

import com.google.gwt.core.client.EntryPoint;
import org.icatportal.client.mvc.AppController;
import org.icatportal.client.mvc.MyDataController;
import org.icatportal.client.mvc.PreferenceController;
import org.icatportal.client.mvc.SearchController;

/**
 *
 * @author ll56
 */
public class MainEntryPoint implements EntryPoint {
    
    /** Creates a new instance of MainEntryPoint */
    public MainEntryPoint() {
    }
    
    /**
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
    public void onModuleLoad() {
        GXT.setDefaultTheme(Theme.GRAY, true);
        GXT.hideLoadingPanel("loading");

        Dispatcher dispatcher = Dispatcher.get();
        dispatcher.addController(new AppController());
        dispatcher.addController(new SearchController());
        dispatcher.addController(new MyDataController());
        dispatcher.addController(new PreferenceController());       

        dispatcher.dispatch(AppEvents.Login);

    }
    
}
